<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"><script src="https://unpkg.com/vue@next"></script>
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h1>遍历数组</h1>
        <ul>
            <li v-for="item,index in arr">item 是{{item}},index 是 {{index}}</li>
        </ul>
        <h1>遍历对象</h1>
        <ul>
            <li v-for="value,key,index in obj">
                value 是{{value}}
                key 是{{key}}
                index 是 {{index}}
            </li>
        </ul>
    </div>
    <script>
        const app = Vue.createApp({
            data(){
                return{
                    arr:[4,3,2,1,0],
                    obj:{
                        a:1,
                        b:2,
                        c:3,
                        d:4,
                    }
                }
            }
        }).mount("#app")
    </script>
</body>
</html>